# Set the minimum version of CMake that can be used
# To find the cmake version run
# $ cmake --version
cmake_minimum_required(VERSION 3.5)

set(PROJECT_NAME LC-3VM)

# Set the project name
project (${PROJECT_NAME})

SET(CMAKE_BUILD_TYPE "Debug")

# Add Debug Macro, named "DEBUG"
IF (CMAKE_BUILD_TYPE STREQUAL Debug)
ADD_DEFINITIONS(-DDEBUG)
ENDIF()

# Create a sources variable with a link to all cpp files to compile
set(SOURCES
    main.cpp
    vm.h
    vm.cpp
    io/win/wininterpt.h
    io/unix/unixinterpt.h
    adt.h
)

# Add an executable with the above sources
add_executable(${PROJECT_NAME} ${SOURCES})

# Set the directories that should be included in the build command for this target
# when running g++ these will be included as -I/directory/path/
target_include_directories(
    ${PROJECT_NAME}
    PRIVATE
        ${PROJECT_SOURCE_DIR}
)
